<?php use_helper('Date') ?>
<div id="maincol" class="grid_16">
<h1><?php	echo htmlspecialchars_decode($news->getTitolo(), ENT_QUOTES);	?></h1>
<?php	echo htmlspecialchars_decode($news->getTesto(), ENT_QUOTES);	?>

<div class="grid_16">
<?php foreach ($articolis as $articoli): ?>
<hr />
<table>
  <tbody>
  <tr><td><?php echo htmlspecialchars_decode($articoli->getTitolo(), ENT_QUOTES); ?></td></tr>
    <tr>
      <td><b>
      <?php echo format_date(date("d F o",strtotime($articoli->getCreatedAt()))); ?></b><br />
      <?php echo htmlspecialchars_decode($articoli->getTesto(), ENT_QUOTES); ?></td>
    </tr>

  </tbody>
</table>
<?php endforeach; ?>
<br /><br />
<?php if ($pager->haveToPaginate()): ?>
  <div class="pagination">
    <a href="<?php echo url_for('news/index/?page=1') ?>">
     &laquo;
    </a> &nbsp;&nbsp;
    <a href="<?php echo url_for('news/index/?page='.$pager->getPreviousPage()) ?>">
      &lsaquo;
    </a>&nbsp;&nbsp;&nbsp;
 
    <?php foreach ($pager->getLinks() as $page): ?>
      <?php if ($page == $pager->getPage()): ?>
        <?php echo $page ?>
      <?php else: ?>
        &nbsp;<a href="<?php echo url_for('news/index/?page='.$page) ?>"><?php echo $page ?></a>&nbsp;&nbsp;
      <?php endif; ?>
    <?php endforeach; ?>&nbsp;&nbsp;&nbsp;
 
    <a href="<?php echo url_for('news/index/?page='.$pager->getNextPage()) ?>">
      &rsaquo;
    </a> &nbsp;&nbsp;
    <a href="<?php echo url_for('news/index/?page='.$pager->getLastPage()) ?>">
      &raquo;
    </a>
  </div>
<?php endif; ?>

<br /><br />
</div>
</div>
